package huoye.shops.huoye.mine.activity;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.codeideology.android.lang.entity.Paging;
import com.codeideology.android.utils.LoginUtils;
import com.codeideology.android.widget.ios.dialog.NormalDialog;
import com.codeideology.android.widget.ios.dialog.listener.OnBtnClickL;
import com.codeideology.android.widget.recycler.RecyclerViewAdapter;

import java.util.ArrayList;
import java.util.List;

import huoye.shops.MainActivity;
import huoye.shops.base.PullToRefreshActivity;
import huoye.shops.base.UserManager;
import huoye.shops.huoye.mine.adapter.DividendAdapter;
import huoye.shops.huoye.mine.model.DividendInfo;
import huoye.shops.huoye.mine.presenter.DividendPresenter;
import huoye.shops.huoye.mine.view.IDividendView;
import huoye.shops.huoye.user.model.User;

public class DividendActivity extends PullToRefreshActivity<DividendInfo> implements IDividendView{


    private DividendAdapter adapter;
    private DividendPresenter mDividendPresenter;

    @Override
    public RecyclerViewAdapter createAdapter() {
        adapter = new DividendAdapter(this);
        return adapter;
    }

    @Override
    protected void initView(@Nullable Bundle bundle) {
        super.initView(bundle);
        setTitle("股东分红");
        mDividendPresenter = new DividendPresenter();
        mDividendPresenter.addTaskListener(this);
        mDividendPresenter.onStart();
       query();
   /*     List<DividendInfo> list = new ArrayList<>();
        for (int i = 0 ; i < 30 ;i++){
            DividendInfo dividendInfo = new DividendInfo();
            dividendInfo.setAllotMoney("80");
            dividendInfo.setShareRatio("80");
            list.add(dividendInfo);
        }
        setDataSet(list,new Paging());*/
    }

    @Override
    public void query(Paging paging) {
        super.query(paging);
        mDividendPresenter.getPageAllotdetailList(paging);

    }

    @Override
    public void onItemClick(DividendInfo data, int i, View view) {

    }
}
